import Vue from 'vue';
import VueRouter from 'vue-router';
import main from '../views/main';
import about from '../views/about';
import blog from '../views/blog';
import message from '../views/message';
import project from '../views/project';
Vue.use(VueRouter);//使用vue插件
export default new VueRouter({
    //配置router,使用name解除组件与路径的耦合关系
    routes:[
        {name:'main',path:'/',component:main},
        {name:'about',path:'/about',component:about},
        {name:'blog',path:'/blog',component:blog},
        {name:'message',path:'/message',component:message},
        {name:'project',path:'/project',component:project},
    ],
    mode:'history',
});